package bookstore.service.impl;



import bookstore.dao.PorductDao;
import bookstore.dao.impl.PorductDaoImpl;
import bookstore.entity.Product;
import bookstore.service.PorductService;

import java.util.List;

/**
 * @author 苗庆
 * @version 1.0
 */
public class PorductServiceImp implements PorductService {

    PorductDao porductDao;
    public PorductServiceImp() {
        porductDao=new PorductDaoImpl();
    }

    /**
     *
     * @return
     */
    @Override
    public List<Product> queryAllGoods() {
        return null;
    }

    /***
     * 苗庆
     * 添加商品信息
     * @param product 商品对象
     * @return   返回值为-1表示失败
     */
    @Override
    public int addTOGoods(Product product) {

        int insert = porductDao.insert(product);
        return insert;

    }

    /**
     *
     * @param product 封装的商品对象
     * @return
     */
    @Override
    public int update(Product product) {
        return 0;
    }

    /**
     *
     * @param product   要删除的商品的ID号
     * @return
     */
    @Override
    public int delete(Product product) {
        return 0;
    }

    /**
     *
     * @param product 用户ID
     * @return
     */
    @Override
    public Product queryById(Product product) {
        return null;
    }

}
